import request from '@/utils/request'

// 查询合同工列表
export function listContractworker(query) {
  return request({
    url: '/hrmanagement/contractworker/list',
    method: 'get',
    params: query
  })
}

// 查询合同工详细
export function getContractworker(id) {
  return request({
    url: '/hrmanagement/contractworker/' + id,
    method: 'get'
  })
}

// 新增合同工
export function addContractworker(data) {
  return request({
    url: '/hrmanagement/contractworker',
    method: 'post',
    data: data
  })
}

// 修改合同工
export function updateContractworker(data) {
  return request({
    url: '/hrmanagement/contractworker',
    method: 'put',
    data: data
  })
}

// 删除合同工
export function delContractworker(id) {
  return request({
    url: '/hrmanagement/contractworker/' + id,
    method: 'delete'
  })
}


// 导入合同工
export function importContractworker(data) {
  return request({
    url: '/hrmanagement/contractworker',
    method: 'post',
    // headers: [{
    //   'Content-Type': 'multipart/form-data', // 确保使用表单数据上传文件
    // }],
    data: data
  })
}